package com.ruleengine.worker.runner.chain;

import java.util.concurrent.CompletableFuture;

import com.ruleengine.worker.model.Chain;

/**
 * @author lianghanwei on 2024/3/3
 */
public interface ChainRunnerObserver {
    /**
     * Chain runner observer receiver update signal
     */
    CompletableFuture<Void> onStatusChange(ChainRunner runner);

    /**
     * Chain runner submit item complete event listener
     * Trigger when item submitted from dispatcher runner to connected rule runners
     */
    CompletableFuture<Void> onSubmitComplete(Chain chain, int lag);
}
